# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=python-ipycanvas
_pyname=${pkgname#python-}
pkgver=0.13.1
pkgrel=2
pkgdesc="Interactive widgets library exposing the browser's Canvas API"
url='https://github.com/martinRenou/ipycanvas'
arch=(any)
license=(BSD)
source=(https://files.pythonhosted.org/packages/source/${_pyname::1}/$_pyname/$_pyname-$pkgver.tar.gz)
depends=(python-ipywidgets python-pillow python-numpy python-setuptools)
makedepends=(python-build python-installer python-jupyter_packaging jupyterlab)
sha256sums=('f9c3940681bc38383390f8c46ea5d8445d6e11c6da6484c37d89df5ae1dac131')

build() {
  cd $_pyname-$pkgver
  python -m build --wheel --no-isolation --skip-dependency-check
}

package() {
  cd $_pyname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
  mv "$pkgdir"/{usr/,}etc
}
